$(function() {
    //大图轮播
    var mySwiper = new Swiper('.swiper-container', {
        loop: true,
        //  pagination: '.swiper-pagination',
    })

    $('.swiper-container .swiper-button-next').on('click', function(e) {
        e.preventDefault()
        mySwiper.swipePrev()
    })
    $('.swiper-container .swiper-button-prev').on('click', function(e) {
        e.preventDefault()
        mySwiper.swipeNext()
    });
    //缩略图轮播

    var thumbnailSwiper = new Swiper('.swiper-thumbnail-container', {
        slidesPerView: 'auto',
        loop: true,
        //  initialSlide: -1, //默认第二个
        loopedSlides: $('.swiper-thumbnail-container .swiper-slide').length
    })
    $('.swiper-thumbnail-container .swiper-button-next').on('click', function(e) {
        e.preventDefault()
        thumbnailSwiper.swipePrev()
    })
    $('.swiper-thumbnail-container .swiper-button-prev').on('click', function(e) {
        e.preventDefault()
        thumbnailSwiper.swipeNext()
    });
    //-------------------------------
    this.map = new qq.maps.Map(document.getElementById("map-container"), {
        //加载地图经纬度信息
        center: new qq.maps.LatLng(39.916527, 116.397128),
        zoom: 13, //设置缩放级别
        draggable: true, //设置是否可以拖拽
        scrollwheel: true, //设置是否可以滚动
        disableDoubleClickZoom: true //设置是否可以双击放大
    });
    $('.aparks-desc .tab-container [data-index]').click(function() {
        var index = $(this).data('index');
        $(this).parents('ul').find('.active').removeClass('active')
        $(this).addClass('active')
        $('.aparks-desc .content[data-index]').removeClass('active');
        $('.aparks-desc .content[data-index="' + index + '"]').addClass('active');
    })
})